#!/usr/bin/env bash

# expected results: Parse: 1 Parse: 0 Execute: 0 Parse: 0 Execute: 0
# Parse: 1 Execute: 1 Parse: 1 Execute: 1 Parse: 1 Execute: 1
set 1 0 0 0 0 1 1 0 1 1

grep "SELECT" $PGPOOLLOG | grep -v version |grep -v Bind|awk '{print $9}' | while read node
do
    if [ $1 -ne $node ]
    then
	echo "expected: $1 result: $node"
	exit 99
    fi
    shift
done

if [ $? = 99 ]
then
   exit 1
fi

exit 0
   
